package com.goodving.guli.bt;

import com.goodving.guli.bt.profile.scale.C0638c;
import com.goodving.guli.bt.profile.scale.GuliLog;

/**
 * Created by john on 2015/11/25.
 */
public class C3831s extends C1035B {
    private static final int f19346b = 2;
    private int f19347a;
    private static final String TAG = "C3831s";


    public C3831s(int i, C0638c c0638c) {
        super(c0638c);
        this.f19347a = 0;
        this.f19347a = i;
    }

    public void m9823a(C0638c c0638c) {
        if (c0638c != null) {
            c0638c.m7915c();
        }
//        C3918p x = this.q.m25618x();
//        GuliLog.m12370d(TAG, "set latency:" + this.f19347a + "\ncurrent latency:\n" + x);
//        if (x != null) {
//            if (this.f19347a == 39) {
//                if (x.f19733e <= 60) {
//                    c0638c.m7916c(Integer.valueOf(8));
//                    GuliLog.m12370d(TAG, "same latency,return now!!!");
//                    return;
//                }
//            } else if (this.f19347a == C4220a.ax) {
//                if (x.f19733e >= C4220a.aA && x.f19733e <= C4220a.aB) {
//                    c0638c.m7916c(Integer.valueOf(8));
//                    GuliLog.m12370d(TAG, "same latency,return now!!!");
//                    return;
//                }
//            } else if (x.f19733e == this.f19347a) {
//                GuliLog.m12370d(TAG, "same latency,return now!!!");
//                return;
//            }
//        }
        GuliLog.m12370d(TAG, "======================do set latency  in======================");
        int i = 0;
        boolean z = false;
        while (true) {
            int i2 = i + 1;
            if (i >= f19346b) {
                break;
            }
//            if (this.f19347a == 39) {
//                z = this.q.m25593a(39, 49, 0, (int) C4220a.aB, 0);
//            } else if (this.f19347a == C4220a.ax) {
//                z = this.q.m25593a((int) C4220a.aA, (int) C4220a.aB, 0, (int) C4220a.aB, 0);
//            } else if (this.f19347a > 0) {
//                z = this.q.m25593a(this.f19347a, this.f19347a, 0, (int) C4220a.aB, 0);
//            }
            if (z) {
                break;
            }
            i = i2;
        }
        GuliLog.m12370d(TAG, "======================do set latency out======================");
        if (c0638c != null) {
            c0638c.m7916c(Integer.valueOf(z ? 8 : -1));
        }
    }
}
